Set Pidgin to start with Windows using HKCU Fixlet
Target OS: Windows
Purpose: to set Pidgin to start with Windows using HKCU so that a user can unset it if desired using the Pidgin UI (through a "Windows Pidgin Options" plugin)
Relevance 1:
(name of it = "WinXP" OR name of it = "WinXP-2003" OR (name of it = "WinVista" AND product type of it = nt workstation product type AND NOT x64 of it) OR (name of it = "WinVista" AND product type of it = nt workstation product type AND x64 of it) OR (name of it = "Win7" AND NOT x64 of it) OR (name of it = "Win7" AND x64 of it)) of operating system
Relevance 2:
exists current user AND (1 = number of logged on users)
exists keys whose (value "DisplayName" of it as string as lowercase contains "Pidgin" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry
Relevance 4:
exists value "DisplayIcon" whose (it as string as lowercase contains "pidgin.exe" as lowercase) of key whose (value "DisplayName" of it as string as lowercase contains "Pidgin" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry
Relevance 5:
not exists value "Pidgin" of key "Software\Microsoft\Windows\CurrentVersion\Run" of (key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry)
Action:
// This action uses an older method to modify HKCU. The advantage to this approach is that it works in the Debugger.
regset64 "[{("HKEY_USERS\" & (name of key whose (((it = name of current user as lowercase OR it starts with name of current user as lowercase & "@") of (it as string as lowercase) of (if (name of operating system = "Win7" OR name of operating system = "WinVista") then value "USERNAME" of key "Volatile Environment" of it else value "Logon User Name" of key "Software\Microsoft\Windows\CurrentVersion\Explorer" of it))) of key "HKEY_USERS" of registry) & "\Software\Microsoft\Windows\CurrentVersion\Run" )}]" "Pidgin"="{escapes of (value "DisplayIcon" whose (it as string as lowercase contains "pidgin.exe" as lowercase) of key whose (value "DisplayName" of it as string as lowercase contains "Pidgin" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string)}"